#ifndef __KTHUMP_H
#define __KTHUMP_H

extern void setup_kthump();

// Masks
#define KBM_RELEASE	0x80

// Codes
#define KB_EXTENDA	0xe0
#define KB_EXTENDB	0xe1
#define KB_EXTENDC	0xe2
#define KB_SETMODE	0xf0
#define KB_ACK		0xfa
#define KB_ERR		0xff

// Our hacks
//
#define KB_F1			0xf1
#define KB_F2			0xf2
#define KB_F3			0xf3
#define KB_F4			0xf4
#define KB_F5			0xf5
#define KB_F6			0xf6
#define KB_F7			0xf7
#define KB_F8			0xf8
#define KB_F9			0xf9
#define KB_F10			0xfa
#define KB_F11			0xfb
#define KB_F12			0xfc

#define KB_SHIFT		0xd0
#define KB_CTRL			0xd1
#define KB_ALT			0xd2
#define KB_NUM			0xd3
#define KB_SCROLL		0xd4
#define KB_CAPS			0xd5
#define KB_SYSREQ		0xd6
#define KB_UP			0xd7
#define KB_DOWN			0xd8
#define KB_LEFT			0xd9
#define KB_RIGHT		0xda
#define KB_PAUSE		0xdb
#define KB_INS			0xdc
#define KB_DEL			0xdd
#define KB_HOME			0xde
#define KB_END			0xdf
#define KB_PGUP			0xc0
#define KB_PGDN			0xc1

#define KEYMAP \
{63, 211, 49, 50, 51, 52, 53, 54, 55, 56, 57, 48, 45, 61, 8, 9, 113, 119, 101, 114, 116, 121, 117, 105, 111, 112, 91, 93, 10, 213, 97, 115, 100, 102, 103, 104, 106, 107, 108, 59, 39, 96, 208, 92, 122, 120, 99, 118, 98, 110, 109, 44, 46, 47, 208, 43, 209, 32, 209, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 47, 42, 55, 56, 57, 45, 52, 53, 54, 10, 49, 50, 51, 48, 221, 45, 216, 217, 63, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 27, 63, 63, 63, 63, 63, 63, 63, 63, 63, 214, 192, 63, 210, 210, 63, 63, 92, 212, 219, 215, 221, 223, 220, 63, 218, 193, 222, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63};
#define KEYMAP_SHIFT \
{63, 211, 33, 64, 35, 36, 37, 94, 38, 42, 40, 41, 95, 43, 8, 9, 81, 87, 69, 82, 84, 89, 85, 73, 79, 80, 123, 125, 10, 213, 65, 83, 68, 70, 71, 72, 74, 75, 76, 58, 34, 126, 208, 124, 90, 88, 67, 86, 66, 78, 77, 60, 62, 63, 208, 43, 209, 32, 209, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 47, 42, 55, 56, 57, 45, 52, 53, 54, 10, 49, 50, 51, 48, 221, 45, 216, 217, 63, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 27, 63, 63, 63, 63, 63, 63, 63, 63, 63, 214, 192, 63, 210, 210, 63, 63, 92, 212, 219, 215, 221, 223, 220, 63, 218, 193, 222, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63};
#define KEYMAP_CAPS \
{63, 211, 49, 50, 51, 52, 53, 54, 55, 56, 57, 48, 45, 61, 8, 9, 81, 87, 69, 82, 84, 89, 85, 73, 79, 80, 91, 93, 10, 213, 65, 83, 68, 70, 71, 72, 74, 75, 76, 59, 39, 96, 208, 92, 90, 88, 67, 86, 66, 78, 77, 44, 46, 47, 208, 43, 209, 32, 209, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 47, 42, 55, 56, 57, 45, 52, 53, 54, 10, 49, 50, 51, 48, 221, 45, 216, 217, 63, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 27, 63, 63, 63, 63, 63, 63, 63, 63, 63, 214, 192, 63, 210, 210, 63, 63, 92, 212, 219, 215, 221, 223, 220, 63, 218, 193, 222, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63};
#endif
